﻿using Ldt.DataEngine.DataFlowParse;
using System;
using System.Collections.Generic;
using System.Text;

namespace Ldt.DataEngin.Assemble
{
    /// <summary>
    /// 数据处理入口
    /// </summary>
    public static class MainFactory
    {
        private static MainComponentBase mainComponentBase { get; set; }

        /// <summary>
        /// 返回基础的数据处理对象
        /// </summary>
        /// <returns></returns>
        public static IMainComponent GetMainBase() 
        {
            if (mainComponentBase == null)
            {
                lock (mainComponentBase)
                {
                    if (mainComponentBase == null)
                    {
                        ConfigFlowLoad flowLoad = new ConfigFlowLoad();
                        mainComponentBase = new MainComponentBase(flowLoad);
                    }
                }
            }
           
            return mainComponentBase;
        }


    }
}
